Fallback to backup files for detail loading.#69
Fallback to backup files for detail loading.#69StoicLoofah merged 1 commit intoggtracker:upstreamfrom
Conversation
f3c2df8 to
48df941
Compare
StoicLoofah
left a comment
There was a problem hiding this comment.
I think this looks awesome! Thanks for digging in and figuring out a solution for this.
Just a few minor comments to cleanup the code. Overall, though, the approach looks awesome!
|
Thanks for the comments! Really helps to have someone look over the changes. |
Anonymized replays are missing the main replay.initData and replay.details files, this will fallback to the backup versions. Add a new print statement case to the GameEvent base to cover when just the player.name is missing.
48df941 to
3aa603c
Compare
|
I agreed with all your requested changes and I think I made them all. (Whoops, I force-pushed to my branch to maintain the single commit and that makes it not quite possible to view the old code outside of the preview windows above) I attempted to capture the logic in a test (test_game_event_string), then added the new case. Assuming I captured the logic correctly, it looks like I made the changes correctly. I also thought about using a replay and an anonymized replay, but I couldn't find a "Global" example in my replays, so I went with the mock route to hit each branch of logic to make sure it stayed the same. |
StoicLoofah
left a comment
There was a problem hiding this comment.
looks good! You put a lot more work into that unit test than I would have, but I'm not going to complain about tests =)
Anonymized replays are missing the main replay.initData and
replay.details files, this will fallback to the backup versions.
Add a new print statement case to the GameEvent base to cover
when just the player.name is missing.
Used a replay called out in #61 to test.